package com.mc.lp.view.controllers;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import com.mc.lp.shared.form.UserRegistrationForm;
import com.mc.lp.view.constants.IConstants;
/**
 * this controller will service will non-session based services like registration, logout, forgot password etc.
 * @author deepak
 *
 */
@Controller
public class AnonymousServiceController implements IConstants {
	
	 @RequestMapping(value = "/service/register-user", method = RequestMethod.POST)  
	  public ModelAndView registerUser(@ModelAttribute("SpringWeb")UserRegistrationForm registrationForm, ModelMap model) {  
		 //TODO
	     System.out.println(registrationForm);
	     ModelAndView modelView = new ModelAndView();
	     modelView.setViewName("redirect:"+PAGES.SUCCESS_PAGE);
	     return modelView;
	   }   	
}
